package com.yohann.designPattern.iterator.client;

import com.yohann.designPattern.iterator.college.College;
import com.yohann.designPattern.iterator.college.ComputerCollege;
import com.yohann.designPattern.iterator.college.InfoCollege;
import com.yohann.designPattern.iterator.output.OutputImpl;

import java.util.ArrayList;

/**
 * <p>
 * 客户端
 * </p>
 *
 * @author Yohann
 * @since 2021/2/12 16:16
 */
public class Client {
    public static void main(String[] args) {
        ArrayList<College> colleges = new ArrayList<>();
        colleges.add(new ComputerCollege());
        colleges.add(new InfoCollege());

        OutputImpl output = new OutputImpl(colleges);

        /*
        ************************
        computer
        ========================
        Java
        PHP
        C
        C++
        C#
        ========================

        ************************
        info-college
        ========================
        信息安全
        网络安全
        通信安全
        ========================
         */
        output.printCollege();
    }
}